package work.xiaohong.business.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import work.xiaohong.business.fallback.StorageFallback;
import work.xiaohong.business.to.StorageTbl;
import work.xiaohong.model.Result;

/**
 * @author xiaohong
 * @version 1.0
 * @date 2021/9/17 0017 13:28
 */
@FeignClient(name = "xiaohong-storage",contextId = "storageTbl",fallback = StorageFallback.class)
public interface StorageFeign {

    @PutMapping("/storage")
    Result updateById(@RequestBody StorageTbl storageTbl);

    @GetMapping("/storage/{id}")
    Result<StorageTbl> findById(@PathVariable(value="id") Integer id);

}
